package com.briup.cms.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.briup.cms.bean.User;
import com.briup.cms.bean.extend.UserExtend;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author briup
 * @since 2025-03-19
 */
public interface IUserService extends IService<User> {

    User login(String username, String password);
    User queryById(Long id);
    boolean save(User user);

    void setVip(Long id);

    //更新用户信息
    void update(User user);

    //删除用户
    void deleteByBatch(List<Long> ids);

    //分页+条件查询
    IPage<UserExtend> query(Integer pageNum, Integer pageSize,
                            String username, String status,
                            Integer roleId, Integer isVip);

    List<User> getAllUser();
}
